<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="author" content="lz">
    <title></title>
    <style>
    
    </style>
</head>
<body>
    
</body>
</html>
<script>
    function People(name,age,isMale){
        this.name=name;
        this.isMale=isMale;
        this.age=age;
    }

    People.prototype.say=function(hua){
        console.log(this.name+'说'+hua)
    }

    var zz = new People('lz',22,true);
    zz.say('我是楼主！')

console.log('---------------------------------------------------------------')
    function Boy(name,age,isMale){
        People.call(this,name,age,isMale)

    }

    function tihuan(){};
    tihuan.prototype=People.prototype;
    Boy.prototype=new tihuan();

    Boy.prototype.constructor = Boy;

    Boy.prototype.play=function(game,hours){
        console.log(this.name+'玩'+game+' '+hours+'小时')
    }
    var yb = new Boy('yb',25,true)
    yb.say('我是杨波！')
    yb.play('lol','24')


console.log('---------------------------------------------------------------')
    function girl(name,age,isMale){
        People.call(this,name,age,isMale);
    }
    function tihuan2(){};
    tihuan.prototype=People.prototype;
    girl.prototype=new tihuan();

    girl.prototype.constructor=girl;

    girl.prototype.goShopping=function(place,hours){
        console.log(this.name+'去了'+place+'逛街'+hours+'小时')
    }

    girl.prototype.isLongHair=true;
    var lcy = new girl('lcy',18,false);
    console.log(lcy.isLongHair)
    lcy.say('lz最帅了~')
    lcy.goShopping('大卫城',8)

console.log('---------------------------------------------------------------')
    function man(name,age,isMale){
        Boy.call(this,name,age,isMale)
    }
    function mane(){};
    mane.prototype=Boy.prototype;
    man.prototype=new mane;
    man.prototype.kill=function(num){
        console.log('得分 '+num)
    }
    man.prototype.constructor=man;
    var lzz = new man('刘壮',22,true)
    lzz.say('智障燕子')
    lzz.play('skt','2')
    lzz.kill(525)

</script>